package dm_tool
{
	/**
	 * 
	 * @author jrags
	 * 
	 */	
	[Bindable]
	public class PowerWeapon
	{
		private var _name:String;
		public function get name():String
		{
			return this._name;
		}
		private var _type:String;
		public function get type():String
		{
			return this._type;
		}
		private var _url:String;
		public function get url():String
		{
			return this._url;
		}
		private var _attackBonus:int;
		public function get attackBonus():int
		{
			return this._attackBonus;
		}
		private var _damage:String;
		public function get damage():String
		{
			return this._damage;
		}
		private var _attackStat:String;
		public function get attackStat():String
		{
			return this._attackStat;
		}
		private var _defense:String;
		public function get defense():String
		{
			return this._defense;
		}
		private var _hitComponents:String;
		public function get hitComponents():String
		{
			return this._hitComponents;
		}
		private var _damageComponents:String;
		public function get damageComponents():String
		{
			return this._damageComponents;
		}
		
		public function PowerWeapon(weaponXml:XML=null)
		{
			if (weaponXml is XML)
			{
				this._name				= weaponXml.@name;
				this._url				= weaponXml.RulesElement.@url;
				this._type				= weaponXml.RulesElement.@type;
				this._attackBonus		= weaponXml.AttackBonus;
				this._damage			= weaponXml.Damage;
				this._attackStat		= weaponXml.AttackStat;
				this._defense			= weaponXml.Defense;
				this._hitComponents		= weaponXml.HitComponents;
				this._damageComponents	= weaponXml.DamageComponents;
			}
		}
	}
}